<template>
    <pui-drawer show title="仿真工程管理器" position="left">
        <div class="resource-drawer-content">
            <div class="resource-tab">
                <div class="tabs-content">
                    <div class="tabs-tree">
                        <pui-tree :show="mainRef.treeShow" :dataList="mainRef.projectTree"></pui-tree>
                    </div>
                </div>
            </div>
        </div>
    </pui-drawer>
</template>
<script lang="ts">
import { defineComponent } from 'vue'
export default defineComponent({
    name: 'resource-content'
})
</script>
<script lang="ts" setup>
import { reactive, onMounted, watch } from 'vue'
const emit = defineEmits({
    onSearch: (val: any) => {},
    openExampleGraph: (val: any) => {},
})
const mainRef = reactive({
    treeShow: false,
    projectTree: [

    ]
}) as any

const init = (type: string) => {
    mainRef.projectTree = [
        { label: '当前工程', value: '1', id: '1', children: [
            { label: 'MZ调制器', value: '11', id: '11', children: [
                { label: '2D截面设置', value: '111', id: '111' },
                { label: '3D结构设置', value: '112', id: '112' },
            ] },
        ] },
    ]
    mainRef.treeShow = true
}

defineExpose({
    init
})
</script>